//加载机器类型配置数据
import {request} from "@/utils/request";

//加载机台类型
export function loadMachineType(data, callback) {
    return request({
        url: "/maintenance/machine_nos",
        method: "get",
        data,
        isYarn: true
    }, callback);
}

//上报
export function maintenanceReport(data, callback) {
    return request({
        url: '/maintenance/report',
        method: 'post',
        data,
        type: 'json',
        isYarn: true,
    }, callback);
}

//列表
export function loadMaintenanceRecordFn(data, callback) {
    return request({
        url: "/maintenance/list_record",
        method: "get",
        data,
        isYarn: true
    }, callback);
}

//撤销
export function cancelRecord(data, callback) {
    return request({
        url: "/maintenance/cancel",
        method: "post",
        data,
        isFile: true,
        isYarn: true
    }, callback);
}

//上报
export function maintenanceAccept(data, callback) {
    return request({
        url: '/maintenance/accept',
        method: 'post',
        data,
        isYarn: true,
        isFile: true
    }, callback);
}

//完成
export function maintenanceFinish(data, callback) {
    return request({
        url: '/maintenance/finish',
        method: 'post',
        data,
        type: 'json',
        isYarn: true,
    }, callback);
}